package com.john.cloud.nacos.feign.controller;

import com.john.cloud.nacos.feign.fallback.EchoServiceFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @Author: JohnCoding
 * @Description:
 * @date: 2020/7/6 15:02
 */
@FeignClient(value = "nacos-provider",fallback = EchoServiceFallback.class) //通过 @FeignClient("服务名") 注解来指定调用哪个服务。代码如下：
public interface EchoService {


    @GetMapping(value = "/echo/{message}")
    String echo(@PathVariable("message") String message);


}
